package day03;

import java.util.Scanner;

public class Test2_If {
    public static void main(String[] args) {
        int a,b,c;
        for (a=1;a<=4;a++){
            for (b=1;b<=4;b++){
                for (c=1;c<=4;c++){
                    System.out.print(a*100+b*10+c+" ");
                }
            }
            System.out.println();
        }
        //企业利润提成
        double i = new Scanner(System.in).nextDouble();
        double profit=0;
        if (i<=100000){
            profit=i*0.1;
        }
        if (i<=200000&&i>100000){
            profit=(i-100000)*0.075+100000*0.1;
        }
        if (i<=400000&&i>200000){
            profit=(i-200000)*0.05+100000*0.075+100000*0.1;
        }//3000+10000+7500+10000
        if (i>=400000&&i<600000){
            profit=(i-400000)*0.03+200000*0.05+100000*0.075+100000*0.1;
        }
        if (i>=600000&&i<=1000000) {
            profit = (i - 600000) * 0.015 + 200000 * 0.03 + 200000 * 0.05 + 100000 * 0.075 + 100000 * 0.1;
        }
        System.out.println(profit);

    }
}
